package com.serviceprovider.business.module.order.model;

public class OrderAttributeValue {
    private Integer        id;
    private OrderAttribute orderAttribute;
    private String         value;

    public OrderAttributeValue() {}

    @Override
    public boolean equals(Object obj) {
        if ((obj == null) ||!(obj instanceof OrderAttributeValue)) {
            return false;
        }

        OrderAttributeValue b  = (OrderAttributeValue) obj;
        boolean             eq = ((id == null) && (b.id == null)) || ((id != null) && id.equals(b.id));

        if (!eq) {
            return false;
        }

        eq = ((value == null) && (b.value == null)) || ((value != null) && value.equals(b.value));

        if (!eq) {
            return false;
        }

        eq = ((orderAttribute == null) && (b.orderAttribute == null))
             || ((orderAttribute != null) && orderAttribute.equals(b.orderAttribute));

        if (!eq) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int prime  = 31;
        int result = 1;

        result = prime * result + ((id == null)
                                   ? 0
                                   : id.hashCode());
        result = prime * result + ((value == null)
                                   ? 0
                                   : value.hashCode());
        result = prime * result + ((orderAttribute == null)
                                   ? 0
                                   : orderAttribute.hashCode());

        return result;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public OrderAttribute getOrderAttribute() {
        return orderAttribute;
    }

    public void setOrderAttribute(OrderAttribute orderAttribute) {
        this.orderAttribute = orderAttribute;
    }
}



